import { GSprite } from "../../../../../com/mui/controls/GSprite";
import { ObjCreate } from "../../common/ObjCreate";
import { Language } from "../../../../../extend/language/Language";
import { GlobalStyle } from "../../../../common/global/GlobalStyle";
import { WardrobeConfig } from "../../../resource/WardrobeConfig";
import { GameDefConfig } from "../../../resource/GameDefConfig";
type int = number;
//class FashionJewelAttriPart
    
    export  class FashionJewelAttriPart extends GSprite
    {
        constructor(arg1: int, arg2: int, arg3: int)
        {
            super();
            this._type = arg3;
            ObjCreate.createBg(0, 0, arg1, arg2, this);
            this.initView();
            return;
        }

        /* internal  */initView(): void
        {
            ObjCreate.createGTextField(Language.getString(70565) + "：", 13, 32, 50, 20, this);
            ObjCreate.createGTextField(Language.getString(70144) + "：", 13, 58, 50, 20, this);
            if (this._type != 1) 
            {
                this._titleTx = ObjCreate.createGTextField(Language.getString(74607), 46, 6, 80, 20, this, GlobalStyle.textFormat2);
                this._lvTx = ObjCreate.createGTextField("", 58, 32, 82, 20, this, GlobalStyle.textFormat5);
                this._attTx = ObjCreate.createGTextField("", 58, 58, 82, 20, this, GlobalStyle.textFormat5);
            }
            else 
            {
                this._titleTx = ObjCreate.createGTextField(Language.getString(74606), 46, 6, 80, 20, this, GlobalStyle.textFormat2);
                this._lvTx = ObjCreate.createGTextField("", 58, 32, 82, 20, this, GlobalStyle.textFormat6);
                this._attTx = ObjCreate.createGTextField("", 58, 58, 82, 20, this, GlobalStyle.textFormat6);
            }
            this._titleTx.autoSize = flash.text.TextFormatAlign.CENTER;
            return;
        }

        public updateInfo(arg1: int, arg2: int): void
        {
            var loc1=null;
            if (arg1 > WardrobeConfig.instance.fashionJewelMaxLv) 
            {
                this._lvTx.text = "";
                this._attTx.text = "";
            }
            else 
            {
                this._lvTx.text = Language.getStringByParam(79016, arg1);
                loc1 = GameDefConfig.instance.getEJewel(arg2);
                this._attTx.text = loc1.text1 + " + " + WardrobeConfig.instance.getfashionJewelAttriByLvDic(arg1, arg2);
            }
            return;
        }

        /* internal */ /* var */_titleTx: Object /* flash.text.TextField */;

        /* internal */ /* var */_lvTx: Object /* flash.text.TextField */;

        /* internal */ /* var */_attTx: Object /* flash.text.TextField */;

        /* internal */ /* var */_type: int;
    }
